package com.tbit.uqbike.client.constant;

/**
 * Redis常量
 *
 * @author Leon
 * 2017年5月18日 下午5:09:43
 */
public class RedisConstant {
    /**
     * 设备前缀
     */
    public static final String REDIS_HASH_ID_HEAD = "uq";

    public static final String REDIS_TER_LAST_POS = "tLP";
    public static final String REDIS_TER_LAST_BATTERY = "tLB";
    public static final String REDIS_TER_ROUTE_KEY = "tRK";
    public static final String REDIS_TER_PKG_DT = "tLT";
    public static final String REDIS_TER_SYNC_TIME = "tST";
    public static final String REDIS_TER_SYNC_VALUE = "tSV";
    public static final String REDIS_TER_NEW_SOFTWAVE = "tNS";
    /**
     * 最后状态
     */
    public static final String REDIS_TER_LAST_STATUS = "tLS";
    /**
     * 出围栏断电标识
     */
    public static final String REDIS_MACHINE_OUTGEO_PUSH = "OUT.GEO.PUSH";

    /**
     * 用户
     */
    public static final String REDIS_ACCOUNT_USER = "USER";
    /**
     * 用户人脸识别有效时间
     */
    public static final String REDIS_USER_FACE = "USER.face";

    /**
     * 用户调度还车标志
     */
    public static final String REDIS_ACCOUNT_USER_DISPATCH = "USERDISPATCH";
    /**
     * 支付费用结束订单流水号
     */
    public static final String REDIS_TER_PAY_FINISHORDER_SERNO = "PAYORDER";
    /**
     * 自动结束订单标识
     */
    public static final String REDIS_PAY_SIGN = "user.pay.";

    /******************************业务信息redis存储key定义*********************************************/
    /**
     * 电子围栏
     */
    public static final String GEO_KEY_PREFIX = "GEO#";

    public static final String RETURN_RGPS_TIMES="GPRS.TIME";
    /**
     * 计费规则
     */
    public static final String FEERULE_KEY_PREFIX = "FEERULE#";
    /**
     * 分时计费规则
     */
    public static final String TIME_FEE_LIST_KEY_PREFIX = "TIMEFEE#";
    /**
     * 分时计费规则
     */
    public static final String TIME_FEE_TYPE_KEY_PREFIX = "TIMEFEE_TYPE#";
    /**
     * 系统配置
     */
    public static final String CONFIG_KEY_PREFIX = "CONFIG#";
    /**
     * 微信支付配置
     */
    public static final String WXPAY_KEY_PREFIX = "WXPAY#";
    /**
     * 支付宝支付配置
     */
    public static final String ZFBPAY_KEY_PREFIX = "ZFBPAY#";
    /**
     * 小程序配置
     */
    public static final String MPCONFIG_KEY_PREFIX = "MPCONFIG#";
    /**
     * 短信配置
     */
    public static final String SMSCONFIG_KEY_PREFIX = "SMSCONFIG#";
    /**
     * 区域配置缓存
     */
    public static final String ACCOUNTCONFIG_KEY_PREFIX = "ACCOUNTCONFIGEXT#";
    /**
     * 品牌配置缓存
     */
    public static final String BRANDREMOTECONFIG_KEY_PREFIX = "BRANDREMOTECONFIG#";
    /**
     * 站点功能配置缓存
     */
    public static final String PARKFEATURE_PREFIX = "PARKFEATURE#";
    /**
     * 汇通天下聚合支付配置还车
     */
    public static final String ADAPAY_PREFIX = "ADAPAY#";
    /**
     * 中科支付配置
     */
    public static final String ZK_PAY_PREFIX = "ZKPAY#";
    /**
     * oss配置
     */
    public static final String OSS_CONFIG_PREFIX = "ossconfig#";
    /**
     * 品牌配置信息
     */
    public static final String BRAND_KEY_PREFIX = "BRANDCONFIG#";

    /**
     * 区域品牌缓存
     */
    public static final String ACCOUNT_KEY_PREFIX = "ACCOUNT#";
    /**
     * 里程缓存
     */
    public static final String MILEAGE_KEY_PREFIX = "MILEAGE#";
    /**
     * 缓存还车角度判断次数
     */
    public static final String ANGLE_FAIL_KEY_PREFIX = "ANGLE#";
    /**
     * 缓存摄像头还车判断次数
     */
    public static final String WEBCAM_FAIL_KEY_PREFIX = "WEBCAM.NUM.";
    /**
     * 缓存RFID还车判断次数
     */
    public static final String RFID_FAIL_KEY_PREFIX = "RFIDTIME#";
    /**
     * 缓存脚撑还车判断次数
     */
    public static final String JC_FAIL_KEY_PREFIX = "JC.NUM.";
    /**
     * 缓存充电桩还车判断次数
     */
    public static final String CDZ_FAIL_KEY_PREFIX = "CDZ.NUM.";
    /**
     * 缓存手机拍照还车判断次数
     */
    public static final String PHONE_FAIL_KEY_PREFIX = "PHONE.NUM.";
    /**
     * 锁定金额缓存
     */
    public static final String DEVIATION_KEY_PREFIX = "DEVIATION#";
    /**
     * 指令流水号缓存
     */
    public static final String ORDER_WEB_KEY_PREFIX = "ORDER_WEB#";
    /**
     * 支付分
     */
    public static final String WEIXIN_PAY_KEY = "WEIXIN_PAY_POINT";
    /**
     * 支付分还车
     */
    public static final String WXZFF_RETURN = "WXZFF_RETURN.";
    /**
     * 支付宝客户端
     */
    public static final String ZFB_PAY_CLIENT = "ALICONFIGWRAP.";
    /**
     * 拍照还车结果
     */
    public static final String PHONE_PHOTO_RESULT = "phone.photo.";

    /**
     * 用户打开App标识
     */
    public static final String USER_LOGIN_SIGN = "open.";

    public static final String USER_DC_SIGN = "user.dc.";
    /**
     * 用户车辆编号流水号绑定
     */
    public static final String MACHINE_NO_SERNO = "m.serNO.";
    /**
     * 用户充值结束订单锁定值
     */
    public static final String USER_FINISH_PAY = "pay.";

    /**
     * 头盔锁指令回复缓存
     */
    public static final String ORDER_HELMET = "od_hm.";
    /**
     * 道钉信息缓存
     */
    public static final String MACHINE_NO_BLEINFO = "bleInfo.";
    /**
     * 头盔锁
     */
    public static final String MACHINE_NO_HELMET = "helmet";
    /**
     * paypal鉴权token
     */
    public static final String PAYPAL_TOKEN = "paypal";
    /**
     * 还车判断成功标识
     */
    public static final String USER_RETURN_BIKE = "check.";

    public static final String PHONE_UPLOAD_BLE = "upload.";
    /**
     * 用户购买优惠券套餐缓存
     */
    public static final String USER_MEAL = "meal.";

    /**
     * 用户借车缓存
     */
    public static final String MACHINE_RIDELOG = "borrow.";

    /**
     * 用户借车订单缓存
     */
    public static final String USER_RIDELOG = "ridelog.";
    /**
     * 用户还车站点缓存
     */
    public static final String USER_PARKPOINTID = "endPointId.";


    public static final String USER_PROHIBITAREAID = "prohibitAreaId.";

    /**
     * 设备流水号缓存
     */
    public static final String USER_MACHINE = "machine.";
    /**
     * 订单还车次数
     */
    public static final String RETURN_NUM = "ProhibitAreaPro.";
    /**
     * 头盔锁指令下发轮询锁
     */
    public static final String HELMET_COMMAND_LOCK = "helmet.command.lock.";
    /**
     * 订单道钉上传指令
     */
    public static final String RIDELOG_RETURN = "r.r.";
    /**
     * 融合定位包数据
     */
    public static final String CENTRALCONTROL_FUSELOCATION_DATA = "centralcontrol.fuselocation.";
    /**
     * 融合定位包数据
     */
    public static final String PHONE_FUSELOCATION_DATA = "phone.fuselocation.";
    /**
     * 设备借车位置
     */
    public static final String MACHINE_BORROW_LOCAL = "b.local.";
    /**
     * 设备还车位置
     */
    public static final String MACHINE_RETURN_LOCAL = "r.local.";
    /**
     * 道钉信息缓存
     */
    public static final String MACHINE_BLE = "ble.";

    /**
     * 道钉信息缓存
     */
    public static final String MACHINE_RFID = "rfid.";
    /**
     * 日志标志
     */
    public static final String LOG_SIGN = "log.sign";
    /**
     * 扫码二维码
     */
    public static final String QRCODE_URL = "qrcode";

    /**
     * 借车查询头盔锁状态指令缓存
     */
    public static final String MACHINE_HELMET_EX = "helmet.ex.";
    /**
     * RGPS还车结果缓存
     */
    public static final String RETURN_RGPS = "RETURN_RGPS.";
    /**
     * 头盔锁状态缓存
     */
    public static final String MACHINE_BORROW_EX = "borrow.ex.";
    /**
     * 头盔锁状态缓存
     */
    public static final String MACHINE_HELMET_STATUS = "hm.";
    /**
     * 设备站点缓存
     */
    public static final String MACHINE_PARKPOINT = "mno.id.";
    /**
     * 订单还车轮询次数
     */
    public static final String ORDER_RETURN_NUM = "order.";
    /**
     * 失窃车辆信息缓存
     */
    public static final String MACHINE_LOSE = "machine.lose.";
    /**
     * 汇付支付分账模式还车
     */
    public static final String ADAPAY_PAY_MODEL = "adapay.model.";
    /**
     * 汇付是否充值全额分账
     */
    public static final String ADAPAY_PAY_CASH = "adapay.cash.";
    /**
     * 汇付支付分账支付详细
     */
    public static final String ADAPAY_PAY_DETAIL = "adapay.detail.";
    /**
     * 用户头盔锁信息
     */
    public static final String USER_OPEN_HELMET = "user.helmet.";
    /**
     * 未开启最佳体验模式等待指令回复
     */
    public static final String USER_CASH_FEE = "cash.";

    /**
     * 分布式锁前缀
     */
    public static final String ORDER_NX = "nx.";

    public static final String RIDELOG_REDUCE = "reduce.";
    /**
     * 微信支付分授权
     */
    public static final String WXPAY_KEY_ZFF = "WXZFF#";
    /**
     * 骑行低电1断电标识
     */
    public static final String MACHINE_BORROW_MAIN = "MACHINE_BORROW_CLIENT";
    /**
     * 借车前蓝牙头盔锁状态
     */
    public static final String RIDELOG_BEFORE_BORROW_STATUS = "before_borrow.";

    /**
     * 骑行订单详情日志
     **/
    public static final String RIDELOG_DETAILS = "ridelog.details.";
    /**
     * 骑行分配置
     */
    public static final String USER_RIDING_SCORE_CONFIG = "USER_RIDING_SCORE_CONFIG";
    /**
     * 用户余额退款锁
     */
    public static final String REFUND_LOCK = "refund.lock.";
    /**
     * 用户退款整个生命周期锁（发起 - 商户处理，商户发起回调 - 接收回调进行处理）
     */
    public static final String REFUND_USER_LOCK = "refund.user.lock.";
    /**
     * 用户登录重复点击锁
     */
    public static final String LOGIN_LOCK = "login.lock.";
    /**
     * 强制还车头盔锁状态缓存
     */
    public static final String FORCE_HELMET_KEY_PREFIX = "force_helmet";
    /**
     * 强制还车摄像头拍照图片缓存
     */
    public static final String FORCE_SXT_KEY_PREFIX = "force_sxt";
    /**
     * 用户实名认证次数缓存
     */
    public static final String USER_AUTH_COUNT_PREFIX = "user_auth_count";
    /**
     * 识别到禁行区道钉缓存
     */
    public static final String ACCOUNT_SPIKE_PREFIX = "account_spike_machine_";
    /**
     * 即将出围栏预警-禁行区
     */
    public static final String REDIS_MACHINE_FORBIDDEN_ID = "FORBIDDEN.ID";
    /**
     * 区域对应品牌缓存
     */
    public static final String ACCOUNT_BRAND_PREFIX = "account_brand_";
    /**
     * 还车分析日志缓存
     */
    public static final String RETURN_BIKE_MSG_LOG_PREFIX = "return_bike_msg_log_";
    /**
     * 流量主授权开关
     */
    public static final String ADVERT_REDIS_KEY = "ADVERT_FLAG_";
    /**
     * 申请重发限制
     */
    public static final String INVOICE_RECORD_RETRY = "invoice_record_retry:";
    /**
     * 锁定订单金额
     */
    public static final String LOCK_ORDER_MONEY = "lock_order_money:";

    /**
     * 人脸校验key
     */
    public static final String FACE_CHECK = "face_check";

    /**
     * 人脸每日验证次数上限
     */
    public static final String FACE_CHECK_DAY_COUNT = "face_check_day_count";

    /**
     * 人脸每日验证次数上限锁key
     */
    public static final String FACE_LOCK = "face_lock";

    /**
     * 人脸短时间失败次数上限
     */
    public static final String FACE_CHECK_SHORT_TIME = "face_check_short_time";


    /**
     * 人脸短时间次数上限
     */
    public static final String FACE_SHORT_TIME = "face_short_time";

    /**
     * 身份证 + 实名认证
     */
    public static final String AUTH_FACE = "auth_face_key";

    /**
     * token前缀
     */
    public static final String TOKEN_PREFIX = "TOKEN";

    /**
     * token分隔符
     */
    public static final String TOKEN_SEPARATOR = ":";

    /**
     * 用户充值结束订单key  recharge_returnBike
     */
    public static final String RECHARGE_RETURNBIKE_PAYMENT_FINISH = "recharge_returnBike_payment_finish:";

    public static final String ORDER_TRACE = "order_trace:";

    /**
     * 欠款补交灰度标识 - 新版本实时分账
     */
    public static final String QKBJ_CASH_TAG = "qkbj_new_";
    /**
     * 用户弹窗广告次数限制key 前缀
     * 格式：前缀+弹窗广告id+userid
     */
    public static final String UserPopUpCount = "POPUP_COUNT";

    /**
     * 禁行区缓存
     */
    public static final String ACCOUNT_FORBIDDEN = "account_forbidden_";
    /**
     * 禁停区缓存
     */
    public static final String ACCOUNT_PROHIBITAREA = "account_prohibitarea_";

    /**
     * 车辆实时位置缓存
     */
    public static final String MACHINE_RIDING_LOCATION = "machine_riding_location_";

    /**
     * 手机号今日是否请求验证码redis前缀
     */
    public static final String CAPTCHA_PREFIX = "captcha:phone:";

    /**
     * 活动数据统计的key
     * INVITE_NEW_活动id_邀请人手机号_邀请人姓名
     * INVITE_NEW_154-13967674457_张三: EXPOSURE -> 5
     * INVITE_NEW_154-13967674457_张三: SHARE -> 5
     */
    public static final String INVITE_NEW = "INVITE_NEW_%s_%s_%s";
    /**
     * 邀请新用户活动的key list集合 的 key
     */
    public static final String INVITE_NEW_KEYS = "INVITE_NEW_KEYS";
    /**
     * 活动数据统计-曝光次数的 filed
     */
    public static final String EXPOSURE = "EXPOSURE";
    /**
     * 活动数据统计-分享次数的 filed
     */
    public static final String SHARE = "SHARE";
    /**
     * 还车触发-限制开头盔锁
     */
    public static final String RETURN_LIMIT_HELMET = "RETURN_LIMIT_HELMET_%s";

    /**
     * 欠款补交区域缓存
     */
    public static final String QKBJ_ACCOUNTID = "qkbj_accountId:";

    /**
     * 发送短信验证码user_agent限制Key
     */
    public static final String SEND_CODE_USER_AGENT = "send_code_user_agent:%d:%s";

    /**
     * 发送短信验证码user_agent频率限制Key
     */
    public static final String INCR_USER_AGENT = "incr_User_Agent:%d:%s";

    /**
     * 自定义临时通电时长前缀
     */
    public static final String TEMP_POWER_KEY = "temp_power_key";
    /**
     * 超远距离借车标识
     */
    public static final String TOO_FAR_BORROW_BIKE = "TOO_FAR_BORROW_BIKE_%s";
    /**
     * 运营区外借车标识
     */
    public static final String OUT_OF_RANGE_BORROW_BIKE = "OUT_OF_RANGE_BORROW_BIKE_%s";
    /**
     * 车辆功能配置缓存key
     */
    public static String getMachineFunctionKey(Integer machineId) {
        return "MACHINE_FUNCTION_KEY_PREFIX#" + machineId;
    }
}
